package Crawler_data;

import java.io.IOException;
import java.io.InputStream;

import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import DAO.L_likeDAO;
import DAO.SongDOA;
import DAOtest.songDAOTest;
import Download.LoadUser;
import HttpClientUtil.HttpClientUtil;
import HttpClientUtil.IPJob;
import each_class.Album;
import each_class.RanKingClass;
import each_class.SingersClass;
import each_class.SongClass;
import ui.global.Current;
import ui.global.Operation;

public class Crawler_data {

	/**
	 * 搜索 提取搜索页上的数据
	 * 
	 * @param keyWord 关键词
	 * @param offset  第几页
	 * @return
	 */
	public static List<SongClass> grabble(String keyWord, int offset) {

		offset = 0; // 翻页 24的倍数
		String url = "http://music.163.com/api/search/get/web?csrf_token=hlpretag=&hlposttag=&s=" + keyWord
				+ "&type=1&offset=" + offset + "&total=true&limit=24"; // 网站接口
		String t = null;
//		for (int i = 0; i < IPJob.proxies.size(); i++) {
//			t = HttpClientUtil.doGetProxy(url,IPJob.proxies.get(i));
//			if(t.length() > 100) {
//				break;
//			}
//		}
		t = HttpClientUtil.doGet(url);

		// System.out.println(t);
		// 按指定模式在字符串查找
		String pattern = "id..[0-9]+..name[^,]+"; // 匹配歌曲，歌手，专辑 的id与nane
		String pattern2 = "[0-9]+"; // 在已经爬取到上面内容的基础上获得id
		String pattern3 = ":[^0-9].*"; // 在已经爬取到上面内容的基础上获得name
		// 创建 Pattern 对象
		Pattern r = Pattern.compile(pattern);
		Pattern r2 = Pattern.compile(pattern2);
		Pattern r3 = Pattern.compile(pattern3);
		// 现在创建 matcher 对象
		Matcher m = r.matcher(t);
		List<SongClass> songList = new ArrayList<SongClass>(); // 创建一个歌曲类集合
		SongClass song = new SongClass(); // 创建一个歌曲
		boolean flag = true; // 用于标记歌曲数据
		boolean flag2 = true; // 用于标记开头
		String sid_2 = null; // 记录前一条数据
		String sname_2 = null;
		Map<String, String> singers = new HashMap<String, String>(); // 歌手集合

		String pattern5 = "duration..[0-9]+"; // 匹配歌曲时长
		// 创建 Pattern 对象

		Pattern r5 = Pattern.compile(pattern5);

		// 创建 matcher 对象

		Matcher m5 = r5.matcher(t);

		while (m.find()) { // 下一个子序列
			Matcher m2 = r2.matcher(m.group(0)); // 现在创建 matcher 对象
			Matcher m3 = r3.matcher(m.group(0)); // 现在创建 matcher 对象
			if (m2.find() && m3.find()) { // 下一个子序列
				String sid = m2.group(0); // 获得匹配字符串
				String sname = m3.group(0);
				// System.out.println(sid + " "+sname);
				if (sid.equals("0") && sname.equals(":\"\"")) { // 数据为一组一组的，可以此为分界
					song.setAlbum_id(sid_2); // 记录专辑
					song.setAlbum_name(sname_2);

					if (m5.find()) {
						song.setSong_time(m5.group(0).substring(10));
					}

					Map<String, Object> map = null;
					try {
						if (Current.getCurrentUser() != null && (map = L_likeDAO
								.findsong(Current.getCurrentUser().getUser_id(), song.getSong_id())) != null) {

							Map<String, Object> map2 = SongDOA.find((String) map.get("SONG_ID"));

							SongClass sClass = LoadUser.loadSong(map2);

							sClass.setSingers(song.getSingers());
							song = sClass;

						}
					} catch (IOException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}

					songList.add(song); // 加入集合中
					song = new SongClass();// 下一首歌
					singers = new HashMap<String, String>();// 下一首歌的歌手
					flag = true;
					flag2 = true;
				} else {
					if (flag2) { // 刚开始访问一组数据
						flag2 = false;
					} else {
						if (flag) { // 这组数据第一次记录数据
							song.setSong_id(sid_2); // 记录歌曲id与name
							song.setSong_name(sname_2);
							flag = false;
						} else {
							singers.put(sid_2, sname_2);// 记录歌手id与name
							song.setSingers(singers);
						}
					}
					sid_2 = sid; // 记录当前数据
					sname_2 = sname.substring(2, sname.length() - 1); // 去掉name数据前面与后面的标点
				}
			}

		}
		return songList;
	}

	/**
	 * 提取歌曲页上的歌手
	 * 
	 * @param id
	 * @param song
	 * @return
	 */
	public static SongClass grabble(String id, SongClass song) {
		String url = "http://music.163.com/api/song/detail/?id=" + id + "&ids=%5B" + id + "%5D";

		String t = null;
//		for (int i = 0; i < IPJob.proxies.size(); i++) {
//			t = HttpClientUtil.doGetProxy(url,IPJob.proxies.get(i));
//			if(t.length() > 100) {
//				break;
//			}
//		}
		t = HttpClientUtil.doGet(url);

		// String t = HttpClientUtil.doGet(url);

		// System.out.println(t);
		// 按指定模式在字符串查找
		String pattern = "name[^,]+..id..[0-9]+"; // 匹配歌曲，歌手，专辑 的id与nane
		String pattern2 = "[0-9]+"; // 在已经爬取到上面内容的基础上获得id
		String pattern3 = ":[^,]+"; // 在已经爬取到上面内容的基础上获得name
		// 创建 Pattern 对象
		Pattern r = Pattern.compile(pattern);
		Pattern r2 = Pattern.compile(pattern2);
		Pattern r3 = Pattern.compile(pattern3);
		// 现在创建 matcher 对象
		Matcher m = r.matcher(t);
		boolean flag = true; // 用于标记歌曲数据
		boolean flag2 = true; // 用于标记开头
		String sid_2 = null; // 记录前一条数据
		String sname_2 = null;
		Map<String, String> singers = new HashMap<String, String>(); // 歌手集合
		while (m.find()) { // 下一个子序列
			Matcher m2 = r2.matcher(m.group(0)); // 现在创建 matcher 对象
			Matcher m3 = r3.matcher(m.group(0)); // 现在创建 matcher 对象
			if (m2.find() && m3.find()) { // 下一个子序列
				String sid = m2.group(0); // 获得匹配字符串
				String sname = m3.group(0);
				// System.out.println(sid + " "+sname);
				if (sid.equals("0") && sname.equals(":\"\"")) { // 数据为一组一组的，可以此为分界
					return song;
				} else {
					if (flag2) { // 刚开始访问一组数据
						flag2 = false;
					} else {
						if (flag) { // 这组数据第一次记录数据
							flag = false;
						} else {
							singers.put(sid_2, sname_2);// 记录歌手id与name
							song.setSingers(singers);
						}
					}
					sid_2 = sid; // 记录当前数据
					sname_2 = sname.substring(2, sname.length() - 1); // 去掉name数据前面与后面的标点
				}
			}

		}
		return song;
	}

	public static void main(String[] args) {
		System.out.println(ranKing("19723756"));
	}

	/**
	 * 获取歌单，排行榜
	 * 
	 * @param id
	 * @return
	 */
	public static RanKingClass ranKing(String id) {
		String url = "http://music.163.com/api/playlist/detail?id=" + id; // 网站接口

		String t = null;
//		int k = 0;
//		for (k = 0; k < IPJob.proxies.size(); k++) {
//			t = HttpClientUtil.doGetProxy(url,IPJob.proxies.get(k));
//			for (int i = 0; i < 20; i++) {
//				if (t.length() < 200) {
//					t =HttpClientUtil.doGetProxy(url,IPJob.proxies.get(k));
//				} else {
//					break;
//				}
//			}
//			if(t.length() < 200) {
//				break;
//			}
//		}
//
//		
//
//
//		if (k ==  IPJob.proxies.size()) {
//			return new RanKingClass();
//		}
		// System.out.println(t);

		t = HttpClientUtil.doGet(url);

		while (t.length() < 100) {
			t = HttpClientUtil.doGet(url);
		}

		// 按指定模式在字符串查找
		String pattern = "..name[^//34]+:[0-9]+"; // 匹配歌曲，歌手，专辑 的id与nane
		String pattern2 = "id..[0-9]+"; // 在已经爬取到上面内容的基础上获得id
		String pattern3 = "name[^,]+"; // 在已经爬取到上面内容的基础上获得name
		// 创建 Pattern 对象
		Pattern r = Pattern.compile(pattern);
		Pattern r2 = Pattern.compile(pattern2);
		Pattern r3 = Pattern.compile(pattern3);
		// 现在创建 matcher 对象
		Matcher m = r.matcher(t);

		List<SongClass> songList = new ArrayList<SongClass>(); // 创建一个歌曲类集合
		SongClass song = new SongClass(); // 创建一个歌曲
		boolean flag = true; // 用于标记歌曲数据
		boolean flag2 = true; // 用于标记开头
		String sid_2 = null; // 记录前一条数据
		String sname_2 = null;
		Map<String, String> singers = new HashMap<String, String>(); // 歌手集合

		String pattern4 = "blurPicUrl[^,]+"; // 匹配图片url
		String pattern5 = "duration..[0-9]+"; // 匹配歌曲时长

		String pattern6 = "coverImgUrl...[^,]+";
		String pattern7 = "status.:0,.name.:.[^,]+";

		// 创建 Pattern 对象
		Pattern r4 = Pattern.compile(pattern4);
		Pattern r5 = Pattern.compile(pattern5);
		Pattern r6 = Pattern.compile(pattern6);
		Pattern r7 = Pattern.compile(pattern7);
		// 创建 matcher 对象
		Matcher m4 = r4.matcher(t);
		Matcher m5 = r5.matcher(t);
		Matcher m6 = r6.matcher(t);
		Matcher m7 = r7.matcher(t);

		RanKingClass ranKingClass = new RanKingClass();
		ranKingClass.setId(id);
		if (m6.find()) {
			ranKingClass.setRanKing_image_url(m6.group(0).substring(14, m6.group(0).length() - 1));
		}

		if (m7.find()) {
			ranKingClass.setRanKingClass_name(m7.group(0).substring(18, m7.group(0).length() - 1));
		}
		while (m.find()) { // 下一个子序列

			Matcher m2 = r2.matcher(m.group(0)); // 现在创建 matcher 对象
			Matcher m3 = r3.matcher(m.group(0)); // 现在创建 matcher 对象

			if (m3.find() && m2.find()) { // 下一个子序列
				String sid = m2.group(0); // 获得匹配字符串
				String sname = m3.group(0);
				// System.out.println(sid_2 + "--------" + sname_2);
				while (true) {
					if (sname.equals("name\":null") && m.find()) {

						m2 = r2.matcher(m.group(0)); // 现在创建 matcher 对象
						m3 = r3.matcher(m.group(0)); // 现在创建 matcher 对象
						if (m2.find() && m3.find()) { // 下一个子序列
							sid = m2.group(0); // 获得匹配字符串
							sname = m3.group(0);
						}

					} else {
						break;
					}
				}
				// System.out.println(sid + " "+sname);
				if (sid.equals("id\":0") && sname.equals("name\":\"\"")) { // 数据为一组一组的，可以此为分界
					song.setAlbum_id(sid_2); // 记录专辑
					song.setAlbum_name(sname_2);

					if (m4.find() && m5.find()) {
						song.setSong_image_url(m4.group(0).substring(13, m4.group(0).length() - 1)); // 获取并设置值
						song.setSong_time(m5.group(0).substring(10));
					}

					// System.out.println(song.toString());

					if (song.getSong_id() != null && song.getSong_name() != null) {

						Map<String, Object> map = null;
						try {
							if (Current.getCurrentUser() != null && (map = L_likeDAO
									.findsong(Current.getCurrentUser().getUser_id(), song.getSong_id())) != null) {

								Map<String, Object> map2 = SongDOA.find((String) map.get("SONG_ID"));

								SongClass sClass = LoadUser.loadSong(map2);

								sClass.setSingers(song.getSingers());
								song = sClass;

							}
						} catch (IOException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
						songList.add(song); // 加入集合中
					}

					song = new SongClass();// 下一首歌

					flag = true;
					flag2 = true;
					for (int i = 0; i < singers.size(); i++) {
						m.find();
					}
					singers = new HashMap<String, String>();// 下一首歌的歌手

				} else {
					if (flag2) { // 刚开始访问一组数据
						flag2 = false;
					} else {
						if (flag) { // 这组数据第一次记录数据
							song.setSong_id(sid_2); // 记录歌曲id与name
							song.setSong_name(sname_2);
							flag = false;
						} else {
							singers.put(sid_2, sname_2);// 记录歌手id与name
							song.setSingers(singers);
						}
					}
					sid_2 = sid.substring(4); // 记录当前数据
					sname_2 = sname.substring(7, sname.length() - 1); // 去掉name数据前面与后面的标点
				}
			}

		}

		ranKingClass.setSongList(songList);
		// System.out.println(ranKingClass);
		return ranKingClass;
	}

	/**
	 * 获取专辑
	 * 
	 * @param album_id
	 * @param album_name
	 * @return
	 */
	public static Album Get_album(String album_id, String album_name) {
		String url = "http://music.163.com/api/album/" + album_id + "?ext=true&id=" + album_id
				+ "&offset=0&total=true&limit=10"; // 网站接口
		// String t = HttpClientUtil.doGet(url);
		String t = null;
//		for (int i = 0; i < IPJob.proxies.size(); i++) {
//			t = HttpClientUtil.doGetProxy(url,IPJob.proxies.get(i));
//			if(t.length() > 100) {
//				break;
//			}
//		}
		t = HttpClientUtil.doGet(url);
		System.out.println(t);

		String pattern = ".:0,.name.:.[^//34]+id..[0-9]+"; // 匹配歌曲id与nane
		String pattern1 = "id..[0-9]+"; // 在已经爬取到上面内容的基础上获得id
		String pattern2 = "name[^,]+"; // 在已经爬取到上面内容的基础上获得name
		String pattern3 = "imgUrl[^,]+"; //
		String pattern4 = "duration..[0-9]+"; // 匹配歌曲时长
		// String pattern5 = "briefDesc......name...[^,]+"; //
		// 创建 Pattern 对象
		Pattern r = Pattern.compile(pattern);
		Pattern r1 = Pattern.compile(pattern1);
		Pattern r2 = Pattern.compile(pattern2);
		Pattern r3 = Pattern.compile(pattern3);
		Pattern r4 = Pattern.compile(pattern4);
		// Pattern r5 = Pattern.compile(pattern5);

		Matcher m = r.matcher(t);
		if (!m.find()) {
			pattern = ".},.name.:.[^//34]+id..[0-9]+";
			r = Pattern.compile(pattern);
			m = r.matcher(t);
			if (!m.find()) {
				pattern = "null,.name.:.[^//34]+id..[0-9]+";
				r = Pattern.compile(pattern);
				m = r.matcher(t);
				if (!m.find()) {
					pattern = "[0-9]..name.:.[^//34]+id..[0-9]+";
					r = Pattern.compile(pattern);
					m = r.matcher(t);
					m.find();
				}
			}

		}

		Matcher m3 = r3.matcher(t);
		Matcher m4 = r4.matcher(t);
		// Matcher m5 = r5.matcher(t);

		Album album = new Album(album_id, album_name);
		List<SongClass> songList = new ArrayList<SongClass>(); // 创建一个歌曲类集合

		// System.out.println(m);
		while (m4.find()) { // 下一个子序列
			Matcher m1 = r1.matcher(m.group(0)); // 现在创建 matcher 对象
			Matcher m2 = r2.matcher(m.group(0)); // 现在创建 matcher 对象

			SongClass songClass = new SongClass();
			if (m1.find() && m2.find()) { // 下一个子序列
				if (!m1.group(0).equals("id\":0") && !m2.group(0).equals("name\":\"\"")) {
					songClass.setSong_id(m1.group(0).substring(4));
					songClass.setSong_name(m2.group(0).substring(7, m2.group(0).length() - 1));
					songClass = gravble_image(songClass);
					songClass.setAlbum_id(album_id);
					songClass.setAlbum_name(album_name);
				}

			}
			songClass.setSong_time(m4.group(0).substring(10));
			Map<String, Object> map = null;
			try {
				if (Current.getCurrentUser() != null && (map = L_likeDAO.findsong(Current.getCurrentUser().getUser_id(),
						songClass.getSong_id())) != null) {
					Map<String, Object> map2 = SongDOA.find((String) map.get("SONG_ID"));
					SongClass sClass = LoadUser.loadSong(map2);
					sClass.setSingers(songClass.getSingers());
					songClass = sClass;

				}
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			songList.add(songClass);
			m.find();
		}
		;
		album.setsClasses(songList);
		// System.out.println(m3.find());
		if (m3.find()) {
			album.setAlbm_image_url(m3.group(0).substring(6));
		}

		System.out.println(album);
		return album;
	}

	/**
	 * 获得歌手专辑
	 * 
	 * @param Singers_id
	 * @param Singers_name
	 * @return
	 */
	public static SingersClass Get_Singers_album(String Singers_id, String Singers_name) {

		String url = "http://music.163.com/api/artist/albums/" + Singers_id + "?id=" + Singers_id
				+ "&offset=0&total=true&limit=10"; // 网站接口
		// String t = HttpClientUtil.doGet(url);
		String t = null;
//		for (int i = 0; i < IPJob.proxies.size(); i++) {
//			t = HttpClientUtil.doGetProxy(url,IPJob.proxies.get(i));
//			if(t.length() > 100) {
//				break;
//			}
//		}
		t = HttpClientUtil.doGet(url);
		// System.out.println(t);
		String pattern = "name[^,]+..id..[0-9]+,.type"; // 匹配歌曲id与nane
		String pattern1 = "id..[0-9]+"; // 在已经爬取到上面内容的基础上获得id
		String pattern2 = "name[^,]+"; // 在已经爬取到上面内容的基础上获得name
		String pattern3 = "picUrl.:.[^,]+"; //
		Pattern r = Pattern.compile(pattern);
		Pattern r1 = Pattern.compile(pattern1);
		Pattern r2 = Pattern.compile(pattern2);
		Pattern r3 = Pattern.compile(pattern3);
		Matcher m = r.matcher(t);
		Matcher m3 = r3.matcher(t);

		SingersClass singersClass = new SingersClass();
		List<Album> albumList = new ArrayList<Album>(); // 创建一个
		List<SongClass> songList = new ArrayList<SongClass>(); // 创建一个歌曲类集合
		songList = grabble(Singers_name, 0);

		while (m.find()) { // 下一个子序列
			Matcher m1 = r1.matcher(m.group(0)); // 现在创建 matcher 对象
			Matcher m2 = r2.matcher(m.group(0)); // 现在创建 matcher 对象
			Album album = new Album();
			if (m1.find() && m2.find()) { // 下一个子序列
				album = Get_album(m1.group(0).substring(4), m2.group(0).substring(4));
			}
			albumList.add(album);
		}
		singersClass.setAlbums(albumList);
		singersClass.setsClasses(songList);
		singersClass.setSingers_id(Singers_id);
		singersClass.setSingers_name(Singers_name);
		if (m3.find()) {
			singersClass.setSingers_image_url(m3.group(0).substring(9));
		}

		return singersClass;
	}

	/**
	 * 提取图片url 提取歌手
	 * 
	 * @param id        歌曲id
	 * @param songClass 歌
	 * @return
	 */
	public static SongClass gravble_image(SongClass songClass) {
		String id = songClass.getSong_id();
		String url = "http://music.163.com/api/song/detail/?id=" + id + "&ids=%5B" + id + "%5D";
		// String t = HttpClientUtil.doGet(url);
		String t = null;
//		for (int i = 0; i < IPJob.proxies.size(); i++) {
//			t = HttpClientUtil.doGetProxy(url,IPJob.proxies.get(i));
//			if(t.length() > 100) {
//				break;
//			}
//		}
		t = HttpClientUtil.doGet(url);
		// System.out.println(t);
		String pattern1 = "blurPicUrl[^,]+"; // 匹配图片url

		// String pattern3 = "mvid..[0-9]+";
		// 创建 Pattern 对象
		Pattern r1 = Pattern.compile(pattern1);

		// Pattern r3 = Pattern.compile(pattern3);
		// 创建 matcher 对象
		Matcher m1 = r1.matcher(t);

		// Matcher m3 = r3.matcher(t);

		while (m1.find()) {
			songClass.setSong_image_url(m1.group(0).substring(13, m1.group(0).length() - 1)); // 获取并设置值
			// songClass.setMv_id(m3.group(0).substring(6));
		}

		if (songClass.getSingers() == null) {
			songClass = grabble(id, songClass);
		}
		return songClass;
	}

	/**
	 * 获取图片
	 * 
	 * @param imageUrl
	 * @throws Exception
	 */
	public static InputStream Get_image(SongClass songClass) throws Exception {
		songClass = gravble_image(songClass);
		// System.out.println(songClass);
		if (songClass.getSong_image_url() != null) {
			URL image = new URL(songClass.getSong_image_url());
			URLConnection connection = image.openConnection();
			InputStream in = connection.getInputStream();
			return in;
		} else {
			return null;
		}

	}

	/**
	 * 获取图片
	 * 
	 * @param imageUrl
	 * @throws Exception
	 */
	public static InputStream Get_image(String url) throws Exception {

		if (url != null) {
			URL image = new URL(url);
			URLConnection connection = image.openConnection();
			InputStream in = connection.getInputStream();
			return in;
		} else {
			return null;
		}

	}

	/**
	 * 获取音频
	 * 
	 * @param imageUrl
	 * @throws IOException
	 */
	public static InputStream Get_music(SongClass songClass) throws IOException {
//		if(songClass == null) {
//			return null;
//		}
//		System.out.println(songClass);
		String musicUrl = "http://music.163.com/song/media/outer/url?id=" + songClass.getSong_id();
		// String musicUrl = "http://music.163.com/song/media/outer/url?id=1846419185";
		URL music = new URL(musicUrl);

		URLConnection connection = music.openConnection();

		connection.setRequestProperty("User-Agent",
				"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko");
		connection.connect();

		InputStream in = connection.getInputStream();

		// System.out.println(in.available() + "asdasdasddasdsd");

//		Properties prop = System.getProperties();
//		// 设置HTTP访问要使用的代理服务器的地址
//		prop.setProperty("http.proxyHost", IPJob.proxies.get(0).getHost());
//		// 设置HTTP访问要使用的代理服务器的端口
//		prop.setProperty("http.proxyPort", "" + IPJob.proxies.get(0).getPort());
//		// java.net.Proxy proxy2 = new java.net.Proxy(proxy.getHost(), null);
//		URL music = new URL("http://music.163.com/song/media/outer/url?id="+ songClass.getSong_id());
//
//		URLConnection connection = music.openConnection();
//		InputStream in = connection.getInputStream();
//		
		for (int i = 0; i < 10; i++) {
			if (in.available() == 0 || in.available() < 100) {
				music = new URL(musicUrl);
				connection = music.openConnection();
				in = connection.getInputStream();
			} else {
				break;
			}

		}

		return in;
	}

	/**
	 * 提取歌词
	 * 
	 * @param id        歌曲id
	 * @param songClass 歌
	 * @return
	 */
	public static Map<String, String> gravble_lyric(SongClass songClass) {
		String url = "http://music.163.com/api/song/lyric?id=" + songClass.getSong_id() + "&lv=1&kv=1&tv=-1";
		String t = HttpClientUtil.doGet(url);
		// System.out.println(t);
		String pattern1 = "[0-9]+.[0-9]+.[0-9]+[^\\\\92]+"; // 匹配歌词
		// 创建 Pattern 对象
		Pattern r1 = Pattern.compile(pattern1);
		Map<String, String> map = new LinkedHashMap<String, String>();
		// 创建 matcher 对象
		Matcher m1 = r1.matcher(t);
		while (m1.find()) {
			String[] st = m1.group(0).split("]"); // 以】分割字符串获取每一句的时间与歌词
			if (st.length == 2) {
				map.put(st[0], st[1]);
			} else {
				map.put(st[0], "");
			}
		}
		System.out.println(map);
		songClass.setLyric(map);
		return map;

	}

}